<template>

  <div class="nav-bar light">
    <div class="left">
      <div class="btn">
        返回
      </div>
    </div>
    <div class="title">呵呵呵</div>

    <div class="right">
      <div class="btn" @click="next">
        完成
      </div>
    </div>
  </div>

  <div class="page">
    <div class="header block b-b">

    </div>

    <div class="navs h row m-b">
      <div class="tab">Ta的动态</div>
      <div class="tab">个人信息</div>
    </div>

    <div class="feeds">

      <div class="feed block p m-b" v-for="feed of feeds" @click="goToDetail(feed)">


        <div class="avatar m-b"></div>


        <div class="row content">
          发生发的发的鬼地方个地方
        </div>


      </div>
    </div>
  </div>


  <div class="tab-bar">

    <div class="tab">预约</div>
    <div class="tab">私信</div>
    <div class="tab">关注</div>

  </div>

</template>

<script type="text/babel">
  import feeds from '../api/feeds'

  export default{
    data(){
      return {
        feeds: []
      };
    },

    route: {
      data(){
        feeds.getFeedsByUserId('100068').then((res)=> {
          if (res.code == 0) {
            this.feeds = res.data;
          }
        })
      }
    },

    methods: {
      next(){
        wsdk.go({url: 'user/100068', type: 2});
      },

      goToDetail(feed){
        wsdk.go({url: 'orderDetail', type: pageType.NATIVE,params:{feedId:feed._id}});
      }
    }
  }
</script>
<style scoped>
  .page {
    margin: 0;
  }

  .header {
    height: 200px;
  }


</style>
